﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Breeze Sample</title>
    <!--<link rel="stylesheet" href="/Content/breezesample.css"/>-->
    <!--3rd party library scripts -->
   

    <script src="~/Scripts/tinymce/tinymce.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.3.4/jquery.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
    <link href="~/Scripts/jquery-easyui-1.3.4/themes/default/easyui.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-easyui-1.3.4/themes/icon.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-easyui-1.3.4/demo/demo.css" rel="stylesheet" />
    <!-- Application scripts -->
    <script type="text/javascript">
        function init(){
            tinymce.init({
                selector: "textarea",
                plugins: [
                    "advlist autolink lists link image charmap print preview anchor",
                    "searchreplace visualblocks code fullscreen"

                ],
                toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
                file_browser_callback: function (field_name, url, type, win) {

                    //tinymce.activeEditor.windowManager.close();
                    //console.log(field_name);

                    tinymce.activeEditor.windowManager.open({
                        title: 'Browse Image',
                        //file: "BreezeSampleShell/Tree" + field_name + "&url=" + url,
                        url: "Tinymce/Tree",
                        width: 450,
                        height: 305,
                        resizable: "no",
                        inline: "yes",
                        close_previous: "no",

                        buttons: [{
                            text: 'Insert',
                            classes: 'widget btn primary first abs-layout-item',
                            disabled: false,
                            onclick: function () {
                                var return_url = window.localStorage['tinymce_return_url'];

                                var input_obj = win.document.getElementById(field_name);

                                input_obj.value = return_url;
                                input_obj.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('input').item(1).value = return_url;

                                tinymce.activeEditor.windowManager.close();
                            }
                        }, {
                            text: 'Close',
                            onclick: 'close',
                            window: win,
                            input: field_name
                        }]
                    },{
                        window:win,
                        input:field_name
                    });

                    return false;
                }

            });

        }

    </script>

</head>
<body onload="init()">
<header>
    <div class="content-wrapper">
        <div class="float-left">
            <p class="site-title">
                <a href="#">Breeze Sample</a>
            </p>
        </div>
    </div>
</header>
<div id="body">
    <section id="content" class="content-wrapper main-content">

        <textarea id="ttt">Your content here.</textarea>

        <p style="color: darkgray;margin-top: 20px">Delete App_Start/BreezeClientSampleRouteConfig.cs to restore default routing to the MVC home controller.<em /></p>

    </section>
</div>

</body>
</html>